From: Sebastian Wick Date: Tue, 2 Apr 2024 11:20:20 +0000 (+0200) Subject: st/clipboard: Pass non-NULL mimetype to SelectionSourceMemory X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~267^2^2~3 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=05861583893c60e7fa38d4abb161e523aac883cb;p=gnome-shell.git st/clipboard: Pass non-NULL mimetype to SelectionSourceMemory meta_selection_source_memory_new previously had some precondition checks which would return NULL if the mimetype is NULL but now that it returns an error we can't do that anymore. Move the precondition checks to the caller instead. Part-of: --- diff --git a/src/st/st-clipboard.c b/src/st/st-clipboard.c index 6df278b2e..4867b1306 100644 --- a/src/st/st-clipboard.c +++ b/src/st/st-clipboard.c @@ -302,6 +302,7 @@ st_clipboard_set_content (StClipboard *clipboard, g_return_if_fail (ST_IS_CLIPBOARD (clipboard)); g_return_if_fail (meta_selection != NULL); g_return_if_fail (bytes != NULL); + g_return_if_fail (mimetype != NULL); if (!convert_type (type, &selection_type)) return;